<template>
  <el-icon class="menu-icon" v-if="route.icon">
    <component :is="route.icon"></component>
  </el-icon>
  <span> {{ route.meta.title }}</span>
</template>
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  name: "MenuText",
  props: {
    route: {
      type: Object,
      required: true,
    },
  },
});
</script>
<style lang="scss" scoped>
.menu-icon {
  vertical-align: text-bottom;
  margin-right: 5px;
  width: 24px;
  text-align: center;
  font-size: 18px;
  > svg {
    vertical-align: text-top;
  }
}
</style>
